<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TestController extends Controller
{
    //

    public function getAuthUser() {
        $user = \Auth::user();
        return $user->toJson();
    }

    public function getAuthUser2(Request $request) {
        $user = $request->user();
        return $user->toJson();
    }

    public function authCheck() {
        if (\Auth::check()) {
            return 'Logined!';
        }
        else {
            return 'Not Logined!';
        }
    }
}
